<template>
  <div class="box">
    <div class="title">
      <label for="title">标题：</label>
      <input type="text"
             v-model="$store.state.node.title">
    </div>
    <div class="dateNow">
      <label for="date">日期：{{$store.state.node.dateNow}}</label>
    </div>
    <div class="textMain">
      <div>内容：</div>
      <textarea v-model="$store.state.node.text"></textarea>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
    }
  },
  mounted () {
    this.$store.commit("setDate")
  }
}
</script>
<style lang="scss" scoped>
.box {
  display: flex;
  flex-direction: column;
}
.title {
  padding: 10px 0;
  display: flex;
  align-items: center;
  input {
    flex: 1;
  }
}
.dateNow {
  padding: 10px 0;
  display: flex;
  align-items: center;
}
.textMain {
  padding: 10px 0;
  flex: 8;
  display: flex;
  flex-direction: column;
  textarea {
    height: 100%;
  }
}
input,
textarea {
  font-size: 16px;
  background: #fff9;
  border: none;
}
</style>